import java.util.List;

public class MasterBizImpl implements MasterBiz{
    private static MasterDao masterDao = null;
    static{
        masterDao = new MasterDaoImpl();
    }
    @Override
    public boolean isExists(String name, String pwd) {
        List<Master> masterList = masterDao.getAllMaster();
        for (Master master:masterList
             ) {
            if(master.getName().equals(name)
            &&master.getPwd().equals(pwd)){
                return true;
            }
        }
        return false;
    }
}
